import { createApp } from 'vue'
import 'lib-flexible/flexible'
import App from './App.vue'
import ElementPlus from 'element-plus';
import router from './router/index'
import store from './vuex/index'
import http from './http/index'
import lang from './local/index'
const util = require('./common/utils')
console.log(util)
/** webpack 会把 required打包成有default默认的东西
 * Module {default: {…}, __esModule: true, Symbol(Symbol.toStringTag): "Module"}
default: {url: ƒ}
url: (...)
Symbol(Symbol.toStringTag): "Module"
__esModule: true
get url: ƒ ()
__proto__: Object
 */
import { judeg } from '../env'
const vue = createApp(App)
import Vant from 'vant';
import 'vant/lib/index.css';
vue.use(Vant)
vue.config.globalProperties.$http = http;
vue.use(ElementPlus, { locale: lang('cn') })
if (judeg) {
  // console.log('production')
} else {
  // console.log('development')
}
vue.use(router)
vue.use(store)
// type vue1 = typeof vue
// let arr = ['component1','component1'] // 组件数组
// function install(vue:vue1, option:{}) {
//   arr.map(res => {
//     vue.component('name','xxx') // 名字 组件
//   })
// }
// vue.use(install)
vue.mount('#app')

/**
 * @param string liu
 */
